home *** CD-ROM | disk | FTP | other *** search
/ Latter-Day Clip Art / Latter-Day Clip Art.iso / browser.dxr / 00011.ls < prev    next >
Encoding:
Text File  |  2001-11-12  |  1003 b   |  36 lines

  1. on mouseDown
  2.   sprite(23).member = "buttonDown"
  3. end
  4.  
  5. on mouseUp
  6.   global GcurrentImage, currentDirectory, format, colorDirectory, decision, imageResolution, baseDirectory
  7.   member(11).text = "Please Wait"
  8.   updateStage()
  9.   theDoc = new(xtra("PrintOMatic"))
  10.   if objectp(theDoc) then
  11.     w = member(GcurrentImage, colorDirectory & " " & currentDirectory).width / imageResolution.float * 72
  12.     h = member(GcurrentImage, colorDirectory & " " & currentDirectory).height / imageResolution.float * 72
  13.     if w > 611 then
  14.       hmarg = 20
  15.       vmarg = 20
  16.     else
  17.       hmarg = (611 - w) / 2
  18.     end if
  19.     if h > 791 then
  20.       vmarg = 20
  21.       hmarg = 20
  22.     else
  23.       vmarg = (791 - h) / 2
  24.     end if
  25.     setMargins(theDoc, rect(hmarg, vmarg, hmarg, vmarg))
  26.     append(theDoc, member(GcurrentImage, colorDirectory & " " & currentDirectory), 0)
  27.     if doJobSetup(theDoc) then
  28.       print(theDoc)
  29.     end if
  30.   end if
  31.   theDoc = 0
  32.   unload()
  33.   member(11).text = "Print"
  34.   sprite(23).member = "buttonUp"
  35. end
  36.